RE: [RMX:#] Re: [RMX:#] Re: How to compare two files and update t

Hi,
In input.txt "56500000001295;A9" is existing 7 times. But in output.txt
file I want only once. I don't want multiple times.
So for this first I have to check either this "56500000001295;A9" is
existing in output.txt or not. If it is not existing I have to write in
output.txt or else I have go to another line.

Thanks and Regards
Reddy

-----Original Message-----
From: Nathan Haigh [mailto:n.haigh [at] sheffield.ac.uk]
Sent: 26 February 2007 17:14
To: Beri Veera-ext, Reddy
Cc: Thurn, Martin; Brian Raven; ActivePerl
Subject: [RMX:#] Re: [RMX:#] Re: How to compare two files and update to
second fil e

Beri Veera-ext, Reddy wrote:
> Hi,
> I don't want to write to output.txt if it is existing.
> Ex: If "56500000001295;A9" is existing in output.txt then I don't want
to
> write the same once again.
>
> Thanks and Regards
> Reddy
>

With the example files you posted previously, can you also supply what
you expect to see in the "output.txt" file at the end - the whole file.
This way, we can see exactly what you are hoping to achieve.

Thanks
Nathan
_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
Reddy.Beri-Veera-ext [ Mo, 26 Februar 2007 17:21 ] [ ID #1640924 ]

Re: [RMX:#] Re: [RMX:#] Re: How to compare two files and update t

Beri Veera-ext, Reddy wrote:
> Hi,
> In input.txt "56500000001295;A9" is existing 7 times. But in output.txt
> file I want only once. I don't want multiple times.
> So for this first I have to check either this "56500000001295;A9" is
> existing in output.txt or not. If it is not existing I have to write in
> output.txt or else I have go to another line.
>
> Thanks and Regards
> Reddy
>

Please supply the contents of the "output.txt" file once you have done
the merge. Please do not attempt to write the pseudocode for the
algorithm you want, as it is this you are having the problems with and
it doesn't make it easier to get your point across. For example, is this
what output you want at the end:
-- snip --
CADItem;56500000001295;A9;IMAN_Rendering;DirectModel;5650000 0001295-A1;jt;None$.jt
CADItem;56500000001295;A4;IMAN_specification;TIFFDrawing;565 00000001295_dr01;tif;56500000001295_dr01.tif
CADItem;56500000001295;A2;IMAN_specification;TIFFDrawing;565 00000001295_dr01;tif;56500000001295_dr01.tif
CADItem;56500000001295;A3;IMAN_specification;TIFFDrawing;565 00000001295_dr01;tif;56500000001295_dr01.tif
CADItem;56500000001295;A6;IMAN_specification;TIFFDrawing;565 00000001295_dr01;tif;56500000001295_dr01.tif
CADItem;56500000001295;A7;IMAN_specification;UGMASTER;565000 00001295-A1;qaf;images_preview.qaf
CADItem;56500000001295;A8;IMAN_specification;TIFFDrawing;565 00000001295_dr01;tif;56500000001295_dr01.tif
-- snip --

If you have multiple occurrences in the input.txt file, which line
should be used? the first line encountered from the top of the file??


_______________________________________________
ActivePerl mailing list
ActivePerl [at] listserv.ActiveState.com
To unsubscribe: http://listserv.ActiveState.com/mailman/mysubs
n.haigh [ Mo, 26 Februar 2007 17:46 ] [ ID #1640925 ]
Perl » gmane.comp.lang.perl.active-perl » RE: [RMX:#] Re: [RMX:#] Re: How to compare two files and update t

Vorheriges Thema: Out of memory error in Storable::thaw (windows, Perl 5.6.1)
Nächstes Thema: RE: [RMX:#] Re: How to compare two files and update to second fil